package com.pwx.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Copyright (C),2021-2022,亚瑟王
 * FileName: Emp
 * Author: saber
 * Date:2022/9/8 21:09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Emp {
   private Integer eno;
   private String ename;
   private String esex;
   private double salary;
   private String pwd;
   private Integer dno;
   @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
   @JSONField(format = "yyyy-MM-dd hh:mm:ss")
   private Date birthday;
   private Dept dept;

   public Emp(String ename, String esex, double salary, String pwd, Integer dno, Date birthday) {
      this.ename = ename;
      this.esex = esex;
      this.salary = salary;
      this.pwd = pwd;
      this.dno = dno;
      this.birthday = birthday;
   }
}
